package com.itheima.logdemo.hystrix;

import com.itheima.logdemo.hystrix.configuration.HystrixThreadLocalConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnClass(com.netflix.hystrix.Hystrix.class)
public class HystrixAutoConfiguration {

    @ConditionalOnClass
    @Bean
    public HystrixThreadLocalConfiguration HystrixThreadLocalConfiguration() {
        return new HystrixThreadLocalConfiguration();
    }
}
